﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Net;
using System.Runtime.Serialization;

namespace Toybox.NicoSharp.Video.MyPage
{
	using Abstracts;

	public class MyMemory : MyPagePrimitives.AbstractMyPageList
	{
		// TODO: MyMemory

		#region Public Constructor

		public MyMemory(CookieCollection cookies)
			: base(cookies)
		{
		}

		#endregion Public Constructor


		#region Protected Methods

		protected override string GetUrl(string method)
		{
			return NicoUrls.FlApi + "mymemory/" + method;
		}

		#endregion Protected Methods


		#region [SubClass]

		public class ListResult : AbstractStatus
		{

			[DataMember]
			public ItemType item_type;

			[DataMember]
			public string item_id;

			[DataMember]
			public string watch;

			[DataMember]
			public int create_time;

			[DataMember]
			public int update_time;

			[DataMember]
			public int mymemory_time;

			[DataMember]
			public Item_Data item_data;

			#region [SubClass]

			[DataContract]
			public class Item_Data
			{
				[DataMember]
				public string video_id;

				[DataMember]
				public string title;

				[DataMember]
				public Uri thumbnail_url;

				[DataMember]
				public int first_retrieve;

				[DataMember]
				public int update_time;

				[DataMember]
				public int view_counter;

				[DataMember]
				public int mylist_counter;

				[DataMember]
				public int num_res;

				[DataMember]
				public string group_type;

				[DataMember]
				public int length_seconds;

				[DataMember]
				public bool deleted;

				[DataMember]
				public string last_res_body;

				[DataMember]
				public string watch_id;

				[DataMember]
				public string parent_thread;

				[DataMember]
				public int mymemory_time;
			}

			#endregion [SubClass]

		}

		public class DelResult : AbstractStatus
		{
			[DataMember]
			public int delete_count;
		}

		#endregion [SubClass]

	}
}
